/**
**************************************************************************************
*Palisma - Secrets of the Illuminati is an open-source 2D RPG                        *
*Copyright (C) 2006, Tony Sparks                                                     *
*                                                                                    *
*This library is free software; you can redistribute it and/or                       *
*modify it under the terms of the GNU Lesser General Public                          *
*License as published by the Free Software Foundation; either                        *
*version 2.1 of the License, or (at your option) any later version.                  *
*                                                                                    *
*This library is distributed in the hope that it will be useful,                     *
*but WITHOUT ANY WARRANTY; without even the implied warranty of                      *
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                   *
*Lesser General Public License for more details.                                     *
*                                                                                    *
*You should have received a copy of the GNU Lesser General Public                    *
*License along with this library; if not, write to the Free Software                 *
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA      *
**************************************************************************************
*/
#pragma once
#include "../mmanager.h"

class IRender;
class ICamera;
/**
========================
The visual representation of a game object
========================
*/
class IView2D : public IMMObject
{
public:

    virtual void Update(long dt)=0;
    virtual void Render( IRender *r, ICamera* cam )=0;
	//virtual void ReceiveEvent( CMMPointer<EntityEvent> &e ) =0;

    void SetZOrder( int z ) { m_zOrder = z; };
    unsigned int  GetZOrder() { return m_zOrder; };

    bool IsVisible() { return m_visible; };
    void SetVisible(bool b) { m_visible = b; };

    unsigned int  GetRefID() { return m_id; };
    void SetRefID(int i) { m_id = i; };

    AUTO_SIZE;
        
    virtual ~IView2D() {};

protected:
    unsigned int    m_id;
    unsigned int    m_zOrder;
    bool            m_visible;

};